The present disclosure generally relates to a computing system, and more particularly to the management of an interrupt in a computer system.
In a computer system, an interrupt is a signal generated by a device to indicate the need of attention from a central processing unit (CPU) and/or its operating system. An interrupt may be generated by, for example, a hard disk signaling that it has read a series of data blocks or a network device signaling that it has processed a buffer containing network packets. The interrupt is typically delivered to the CPU. When the CPU receives the interrupt, the CPU saves its state of execution and begins execution of the interrupt handler.
If the device asserts a level triggered interrupt, the interrupt signal remains high until the interrupt is cleared. The level triggered interrupt automatically re-interrupts the processor if the interrupt is not cleared. When a device signals a level triggered interrupt, the interrupt handler may identify the source and specific cause of the interrupt and service the interrupt, thereby de-asserting the interrupt source. The interrupt handler handling the level-triggered interrupt may perform specific operations to ensure the interrupt signal is brought to an inactive state. Otherwise, the device may constantly generate interrupts to the processor.
In a typical, non-virtualized environment, the guest operating system may service the interrupt. When the device is assigned to a virtual machine, the host operating system is no longer directly in control of identifying the cause of the interrupt, nor does the host operating system know how to service the interrupt. It may be desirable for the host machine to protect the overall system from devices that may interrupt many times while waiting for the guest operating system to service the device.